//
//  UIImage+Stretchable.m
//  AppsTemplate
//
//  Created by Maple on 9/17/14.
//  Copyright (c) 2014 Maple. All rights reserved.
//

#import "UIImage+Stretchable.h"

@implementation UIImage (Stretchable)

+ (UIImage *)stretchableImageName:(NSString *)imageName leftCapWidth:(NSInteger)width topCapHeight:(NSInteger)height{
    
    UIImage *image = [self imageNamed:imageName];
    if (image) {
        return [image stretchableImageWithLeftCapWidth:width topCapHeight:height];
    }
    return nil;
}

+ (UIImage *)stretchableImage:(UIImage *)image leftCapWidth:(NSInteger)width topCapHeight:(NSInteger)height{
    
    if (image) {
        return [image stretchableImageWithLeftCapWidth:width topCapHeight:height];
    }
    return nil;
}

@end
